﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Documents;
using System.Windows.Media;
using System.Windows.Shapes;

namespace TreeBuilder
{
    public class LineAdorner : EllipseAdorner
    {
        public LineAdorner(UIElement adornedElement) : base(adornedElement)
        {
        }

        protected override void OnRender(DrawingContext drawingContext)
        {
            if (!IsActive) return;
            var line = ((Line) AdornedElement);
            var points = new[]{new Point(line.X1, line.Y1), new Point(line.X2, line.Y2)};

            DrawPoints(points, drawingContext);
            
        }
    }
}
